﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>您心中的英国印象</title>
<link href="css/popup.css" rel="stylesheet" type="text/css" />
    <script src="../cn/js/jquery-1.3.2.js" type="text/javascript"></script>
    <script type="text/javascript" >
        var EngCode = 1033;
        //发送请求
        function LoadPost() {
            $.post(
        "result.aspx", { code: EngCode },
         function (data) {


             if (data != "0") {
                 Fillzone(data)

             } else {
                 alert("网络连接异常");
             }


         }
        );
        }
        //填充
        function Fillzone(data) {

            var sT = "<li><span>";

            var eN = "</span></li><li><img src=";

            var last1N = "images/icon_vote_"
            var last2N = ".gif height='20'  width='";

            var last3N = "'/></li>";

            var lastHtml = "";
            var newdata = data.split('|');
            var tst = 0;
            var st = 0;
            for (var i = 0; i < newdata.length; i++) {
                var thtml = newdata[i].toString();

                st = parseInt(thtml.substring(thtml.indexOf(',') + 1, thtml.indexOf('V')));
                lastHtml += sT + thtml + eN + last1N + (i + 1) + last2N + st + last3N;
                tst += st;

            }

            document.getElementById("ts").innerHTML ="Total Voters:" +tst.toString();
            document.getElementById("FillZone").innerHTML = lastHtml;
        }
  
    </script>
</head>
<body onload="LoadPost()">
<div id="vote">
	<div class="close"><a href="#" onclick="parent.tb_remove();"><img src="images/icon_vote_close.gif" alt="" /></a></div>
    <div class="content">
    	<div class="title">Results</div>
        <div class="result">
        	<ul id="FillZone">
            	
            </ul>
        </div>
        <h5><span id="ts"></span></h5>
        <div class="resultbtn"><a href="#" onclick="parent.tb_remove();"><img src="images/btn_close.gif" alt="" /></a></div>
    </div>
</div>
</body>
</html>
